<template>
	<!--我关注的租房-->
	<!--https://youzan.github.io/vant/#/zh-CN/intro-->
	<div class="houselist">
		<!--头部-->
		<myheader></myheader>
		<!--房源/门店-->
		<!--tab组件切换-->
		<div class="tablist">
			<router-link to='/houselist'>房源</router-link>
			<router-link to='/percent/store'>门店</router-link>
		</div>
		<router-view/>
	</div>
</template>
<script>
	import myheader from '@/components/public/myheader'
	export default {
		name: 'houselist',
		data() {
			return {}
		},
		mounted:function() {
			//判读是否登陆了
			if(localStorage.getItem("nameid")==null||localStorage.getItem("nameid")==undefined||localStorage.getItem("nameid")==""){
				this.$router.push({
					name:'login'
				});
			}
			else{
				
			}
		},
		components: {
			myheader
		},
		methods: {}
	}
</script>

<style scoped="scoped">
	a{
		color: #000000;
	}
	.tablist {
		width: 100%;
		height: 0.8rem;
		border: 2px solid #f2f2f2;
		display: flex;
		justify-content: space-around;
		align-items: center;
		box-sizing: border-box;
	}
	
	.tablist>a {
		height: 0.8rem;
		width: 1rem;
		text-align: center;
		line-height: 0.8rem;
		font-size: 0.3rem;
	}
	.router-link-active {
		color: #0540cd;
		border-bottom: 1px solid #a9bede;
	}
</style>